From: Fabián Ezequiel Gallina Date: Thu, 17 May 2012 03:03:34 +0000 (-0300) Subject: Enhancements on python-check command. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~2326^2~2170 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=bba416bcf2bc4270420bf99f6a28b06f9e4e68b3;p=emacs.git Enhancements on python-check command. Use pyflakes (PyChecker is dead) and run the process respecting virtualenv rules. --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index def6d8bba94..5406d74f69e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2144,7 +2144,7 @@ The skeleton will be bound to python-skeleton-NAME." ;;; Code check (defcustom python-check-command - "pychecker --stdlib" + "pyflakes" "Command used to check a Python file." :type 'string :group 'python) @@ -2168,7 +2168,9 @@ Runs COMMAND, a shell command, as if by `compile'. See ""))))))) (setq python-check-custom-command command) (save-some-buffers (not compilation-ask-about-save) nil) - (compilation-start command)) + (let ((process-environment (python-shell-calculate-process-environment)) + (exec-path (python-shell-calculate-exec-path))) + (compilation-start command))) ;;; Eldoc